import Http from '@/utils/http'
import type { RequestOptions } from '@/utils/http/type'

// 创建多个域名的实例
const api = new Http('https://jsonplaceholder.typicode.com')
const anotherApi = new Http('https://picsum.photos')

const getUser = (params?: any, config?: RequestOptions) => api.get('/users', params, config)

const getImgs = (params?: any, config?: RequestOptions) =>
  anotherApi.get('/v2/list', params, config)

export { getUser, getImgs }
